﻿Public Class Ingreso

    Private Sub buttoningresocosme_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttoningresocosme.Click
        Dim a As String
        Dim b As String
        Dim c As String

        a = textnomcosme.Text
        b = textrutcosme1.Text
        c = textrutcosme2.Text

        If a = "" Or b = "" Or c = "" Then

            MsgBox("DEBE INGRESAR LOS DATOS SOLICITADOS")
        Else
            Acciones.Show()
            Me.Hide()

        End If




    End Sub

    'se valida el ingreso de solo numeros en el campo de rut de cosmetologa

    Public Sub NumerosyDecimal(ByVal CajaTexto As Windows.Forms.TextBox, ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If Char.IsDigit(e.KeyChar) Then
            e.Handled = False
        ElseIf Char.IsControl(e.KeyChar) Then
            e.Handled = False
        ElseIf e.KeyChar = "." Then
            e.Handled = True And Not CajaTexto.Text.IndexOf("..")
        Else
            e.Handled = True
        End If
    End Sub

    'se llama a la funcion en el textboxrutcosme1 para el ingreso

    Private Sub textrutcosme1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles textrutcosme1.KeyPress
        NumerosyDecimal(textrutcosme1, e)

    End Sub


End Class